package com.baox.agridata.synchronous.service.impl;

import com.baox.agridata.synchronous.dao.TCCAAMapper;
import com.baox.agridata.synchronous.entity.TCCAAEntity;
import com.baox.agridata.synchronous.entity.TCCABEntity;
import com.baox.agridata.synchronous.service.TCCAAService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TCCAAServiceImpl implements TCCAAService {

    @Autowired
    private TCCAAMapper tccaaMapper;


    @Override
    public Integer insertIntoTCCAA(TCCAAEntity tccaaEntity) {  //成都过来的数据，插入四川的数据库中
        return tccaaMapper.insertIntoTCCAA(tccaaEntity);
    }

    @Override
    public TCCAAEntity selectTCCAAById(String mid) {   //数据入库前，先根据主键id查询 一下，是否存在该条数据
        return tccaaMapper.selectTCCAAById(mid);
    }

    @Override
    public Integer updateTCCAAById(TCCAAEntity tccaaEntity) {  //当成都过来的数据，在四川存在的时候，说明证的状态有变更，我们需要更新数据
        return tccaaMapper.updateTCCAAById(tccaaEntity);
    }


    @Override
    public List<TCCAAEntity> selectChengDuAnimalALandingBack(String createTime, String endTime) {
        return tccaaMapper.selectChengDuAnimalALandingBack(createTime, endTime);
    }

    @Override
    public Integer selectSiChuanReceiveCDAnimalA(String startTime, String endTime) {
        return tccaaMapper.selectSiChuanReceiveCDAnimalA(startTime, endTime);
    }
}
